-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql
-- https://github.com/dillonkearns/elm-graphql


module Qore.Query exposing (..)

import Graphql.Internal.Builder.Argument as Argument exposing (Argument)
import Graphql.Internal.Builder.Object as Object
import Graphql.Internal.Encode as Encode exposing (Value)
import Graphql.Operation exposing (RootMutation, RootQuery, RootSubscription)
import Graphql.OptionalArgument exposing (OptionalArgument(..))
import Graphql.SelectionSet exposing (SelectionSet)
import Json.Decode as Decode exposing (Decoder)
import Qore.InputObject
import Qore.Interface
import Qore.Object
import Qore.Scalar
import Qore.ScalarCodecs
import Qore.Union


type alias CollectionRequiredArguments =
    { id : Qore.ScalarCodecs.Id }


{-| Finding Aid for a given collection (fonds, record group, manuscript group, etc.)

  - id - Id of the object.

-}
collection : CollectionRequiredArguments -> SelectionSet decodesTo Qore.Object.Ead -> SelectionSet (Maybe decodesTo) RootQuery
collection requiredArgs object_ =
    Object.selectionForCompositeField "collection" [ Argument.required "id" requiredArgs.id (Qore.ScalarCodecs.codecs |> Qore.Scalar.unwrapEncoder .codecId) ] object_ (identity >> Decode.nullable)


{-| All finding aid in the archive.
-}
allCollections : SelectionSet decodesTo Qore.Object.Ead -> SelectionSet (List decodesTo) RootQuery
allCollections object_ =
    Object.selectionForCompositeField "allCollections" [] object_ (identity >> Decode.list)


{-| To test the <abstract> type.
-}
abstractTest : SelectionSet decodesTo Qore.Object.Abstract -> SelectionSet decodesTo RootQuery
abstractTest object_ =
    Object.selectionForCompositeField "abstractTest" [] object_ identity


{-| To test the <agencyname> type.
-}
agencyNameTest : SelectionSet decodesTo Qore.Object.Agencyname -> SelectionSet decodesTo RootQuery
agencyNameTest object_ =
    Object.selectionForCompositeField "agencyNameTest" [] object_ identity


{-| To test <titleproper> type.
-}
titleProperTest : SelectionSet decodesTo Qore.Object.Titleproper -> SelectionSet decodesTo RootQuery
titleProperTest object_ =
    Object.selectionForCompositeField "titleProperTest" [] object_ identity
